package com.artifact.services.impl;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.artifact.dao.AdminDao;
import com.artifact.dao.RenewDao;
import com.artifact.services.AdminAjaxServices;

@Service("adminAjaxServices")
public class AdminAjaxServicesImpl implements AdminAjaxServices {
	private AdminDao adminDao;
	private RenewDao renewDao;

	@Resource(name = "renewDao")
	public void setRenewDao(RenewDao renewDao) {
		this.renewDao = renewDao;
	}

	@Resource(name = "adminDao")
	public void setAdminDao(AdminDao adminDao) {
		this.adminDao = adminDao;
	}

	@Override
	public boolean addAdmin(String userid, String password, String remarksInfo) {
		return adminDao.addAdmin(userid, password, remarksInfo);
	}

	@Override
	public boolean deleteAdmin(String userid) {
		return adminDao.deleteAdmin(userid);
	}

	@Override
	public boolean updateAdminid(String userid, String AdminInfo) {
		return adminDao.updateUserid(userid, AdminInfo);
	}

	@Override
	public boolean updatePassword(String userid, String password) {
		return adminDao.updatePassword(userid, password);
	}

	@Override
	public boolean updateRemarksInfo(String userid, String remarksInfo) {
		return adminDao.updateRemarksInfo(userid, remarksInfo);
	}

	@Override
	public boolean payMoney(String userid) {
		return renewDao.setRenewIsDeal(userid);
	}

}
